<%@ page language="java" import="java.util.*" pageEncoding="utf-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/jquery-2.1.0.js"></script>
<script>
	$(function () {
		$.post("${pageContext.request.contextPath}/news?param=hotpro",
		function (data) {


			for (var i = 0; i <data.length ; i++) {
				var $li=$("<li></li>");
				var $dl=$("<dl></dl>");
				$(".hot_sale ul").append($li);
				$li.append($dl);
				var $dt=$("<dt>"+"<a href='${pageContext.request.contextPath}/product?param=shop&id="+data[i].id+"' target='_self'>"+"<img src='${pageContext.request.contextPath}/"+data[i].img_source+"'/></a></dt>");
				$dl.append($dt);
				var $dd=$("<dd class='p_name'>"+"<a href='${pageContext.request.contextPath}/product?param=shop&id="+data[i].id+"' target='_self'>"+data[i].name+"</a><dd>")
				$dl.append($dd);
				var $dd2=$("<dd class=\"price\">"+"￥"+data[i].price+"</dd>")
				$dl.append($dd2);
			}
		},"json")
	})
</script>
<div class="hot_sale">
	<h2>热卖推荐</h2>
	<ul>

	</ul>
</div>
